﻿using FinScreen.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FinScreen.Util;
using TdxConnector;

namespace FinScreen.ViewModel
{
    class DisplayPosition
    {
        [DisplayName("代码")]
        public string InstrumentCode { get; set; }
        [DisplayName("名称")]
        public string InstrumentName { get; set; }
        [DisplayName("P&L")]
        public double PnL { get; set; }
        [DisplayName("P&L%")]
        public double PnlPct { get; set; }
        [DisplayName("数量")]
        public int Quantity { get; set; }
        [DisplayName("成本价")]
        public double Price { get; set; }
        [DisplayName("市值")]
        public double MarketValue { get; set; }
        [DisplayName("市场价")]
        public double MarketPrice { get; set; }

        [DisplayName("可卖数量")]
        public int QuantityCanBeSold { get; set; }
        [DisplayName("今买数量")]
        public int QuantityBoughtToday { get; set; }
        [DisplayName("今卖数量")]
        public int QuantitySoldToday { get; set; }

        public DisplayPosition(Position position)
        {
            this.MergeProperties(position);
        }
    }
}
